The present invention relates to a distributed database management system having a plurality of information processors connected to a network.
Recently, database management systems for holding various data in common so as to use it effectively are introduced in many information processing systems.
Among them, a relational database management system for handling data in a related table format has come into wide use rapidly.
Conventional users construct a database on a main frame system and search or update common data. However, there are problems on cost, function, and operability imposed in a database management system of a main frame system.
Therefore, such a database management system of a main frame system is being changed to a client server type database management system using a miniature information processor such as a workstation or personal computer so as to decrease the cost of the system, to expand the function, to improve the operability, and to respond to the diversified information society flexibly. The client server type database management system can construct a highly expandable distributed database environment depending on the business scale.
A user connects an information processor which is a client to each database management system via a network and accesses a table on a relational database using a database access statement, for example, in the SQL (structured query language) which is the standard data manipulation language of the ISO (International Standardization Organization). In this case, it is necessary for the user in the distributed database environment to always recognize the database where the table to be accessed is stored, that is, the table location and to connect himself to an appropriate database before table access. Furthermore, it may be necessary to add the table location to each access statement. However, in a large scale distributed database environment, it is difficult for the user to recognize many table locations one by one and addition of the table location to each access statement requires a very complicated operation.
In the relational database, data in a plurality of related tables is searched by a database access statement and the tables can be joined as a table. This processing which is called a join is generally executed in a single database management system. In the distributed database environment, however, a join (distributed search function) for a plurality of tables stored in different database management systems is also necessary. However, a general client cannot be connected to a plurality of database management systems at the same time. Therefore, there is a product in which the database management system which receives a join request automatically fetches data from another database management system and joins it with the own search data so as to support the distributed search function. When such a distributed search function is used, it is necessary for the user to explicitly describe identification information for another database management system in which the table to be accessed is stored and user certification information at the time of connection in the database access statement.
To solve the above problems, it is important to allow the user in the distributed database environment not to be aware of the database management system where the table is stored, that is, to make the table position transparent.
As a method for realizing such a subject, there is a derivation database processing method which is described in Japanese Patent Application Laid-Open No. 4-112246. This method collects tables on a plurality of distributed database management systems partially and handles them as a derivation database and the user registers the definition information of each database management system and the definition information of the derivation database in a dictionary. The definition information of each database management system consists of identification information of a plurality of tables stored in each database and the definition information of the derivation database consists of identification information of a plurality of database management systems and tables which constitute the derivation database. The database manipulation means receives a derivation database access request from the application program, searches the above dictionary for the table location, and issues a database access statement to the database management system where the table is stored. By this method, the application program can access a plurality of database management systems via a derivation database.
By this derivation database processing method, the user can access a plurality of tables which are registered in the dictionary as a derivation database without being aware of the table location. However, when the user creates a new table after definition of the derivation database, it is necessary for the user to additionally define the created table and the stored identification information of the database management system in the dictionary.
In the distributed database environment, each department of enterprises often operates each database management system independently and accordingly there is a possibility that a duplicated table name exists between a plurality of database management systems. Since the aforementioned derivation database processing method identifies tables of the duplicated name uniquely, it is necessary to define a different name for each table.
In a general database environment, a new table is created frequently. Therefore, in the aforementioned derivation database processing method, it is necessary for the user to redefine the derivation database every time or to define a different name of the table and the operation burden is increased.
The database management system prevents an unqualified person from use of a database under the account control using the independent user ID (identifier: identification) and password (hereafter a combination of the two is called an account). The account control means installed in the database management system checks the password which is inputted by the user at the time of logging-in prior to table access, checks whether the logging-in user is granted a privilege for writing or reading in the table or record to be accessed, and then starts the table access processing.
However, in the distributed database environment where each database management system is operated independently, the accounts registered in the database management systems are not always the same. There is a method available for reregistering the accounts of all the database management systems and constructing a unified database account environment. However, for the reason of an increase in the account reregistration operation and reusing to the existing database application program property, many enterprises use a different account environment for each database management system continuously. Therefore, it is necessary for the user to selectively use the corresponding account for each database management system to be connected. However, in a large scale distributed database environment, in the same way as with the table location, storing and using of accounts to be used by the user for many database management systems require a very complicated operation.
An object of the present invention is to eliminate the difficulties of the prior arts mentioned above and to provide a distributed database management system which can correspond to a large scale distributed database environment by a simple operation without the table location being added to many access statements by the user.
Another object of the present invention is to provide a distributed database management system which can correspond to a large scale distributed database environment on the basis of single account information without a large amount of account information being stored and used by the user.
Another object of the present invention is to provide a distributed database management system which has a distributed database access management unit in a gateway server or specific database server and can correspond to a large scale distributed database environment with a simple configuration.
To accomplish the above objects, the present invention is a distributed database management system consisting of a terminal device which is connected to a network and has an application program execution means and of a plurality of information processors (servers) connected to the above network, wherein a distributed database access management means including a logical database defining unit for defining a logical database in which at least one database among physical databases covering the above plurality of information processors (servers) is grouped beforehand, a logical database dictionary for registering the definition information of the logical database which is defined in the above logical database defining unit, a logical database access controller for receiving a database access statement which is instructed from the application program execution means of the above terminal device, and a table location searching unit for searching for the database stored in the desired table on the physical database belonging to the logical database via the physical database management system of the above desired information processor (server) with reference to the definition information of the logical database which is registered in the above logical database dictionary on the basis of the database access statement received by the above logical database access controller is installed in the above desired information processor (server). Furthermore, the present invention is a distributed database management system consisting of a terminal device which is connected to a network and has an application program execution means and of a plurality of information processors (servers) connected to the above network, wherein a distributed database management means including a logical database defining unit for defining the identification information of the physical database constituting the logical database in which at least one database among physical databases covering the above plurality of information processors (servers) is grouped beforehand and the account information of the physical database, a logical database dictionary for registering the identification information of the physicl database constituting the logical database and the account information of the physicl database which are defined in the above logical database defining unit, a logical database access controller for receiving a database access statement which consists of the identification information of the logical database and of the account information of the logical database which are instructed from the application program execution means of the above terminal device, and a table location searching unit for logging in the physical database belonging to the logical database via the physical database management system of the above desired information processor (server) with reference to the identification information and the account information of the physical database which is registered in the above logical database dictionary on the basis of the database access statement received by the above logical database access controller and searching for the database stored in the desired table is installed in the above desired information processor (server). Furthermore, the present invention is a desired database server among a plurality of database servers having a physical database management system and a physical database as a desired information processor (server) having the above distributed database access management means in the above distribution database management system.
Furthermore, the present invention is a gateway server for positioning between a plurality of database servers having the above physical database, physical database management system, and terminal device via the above network as a desired information processor (server) having the above distributed database access management means in the above distributed database management system and for managing the above plurality of database servers.
Furthermore, in the above distributed database management system of the present invention, the above definition information which is registered in the logical database dictionary includes the priority order of each physical database constituting the logical database and the above table location searching unit searches for the database stored in the desired table on the physical database on the basis of the priority order registered in the above logical database dictionary.
Furthermore, in the above distributed database management system of the present invention, the above definition information which is registered in the logical database dictionary includes the access privilege information for the logical database and the above table location searching unit checks the access privilege of the application program user which is instructed from the above terminal device prior to access to the logical database.
Furthermore, in the above distributed database management system of the present invention, the above definition information which is registered in the logical database dictionary includes the account information of the physical database constituting the logical database and the above table location searching unit logs in the physical database constituting the logical database using the database account registered in the above logical database dictionary on the basis of the account information of the application program user which is instructed from the above terminal device.
Furthermore, in the above distributed database management system of the present invention, the above table location searching unit checks the account information which is received from the application program which is instructed from the above terminal device with the account of the above logical database prior to access to the logical database.
Furthermore, in the above distributed database management system of the present invention, the above definition information which is registered in the logical database dictionary includes the account information of the physical database constituting the logical database and the above table location searching unit logs in the physical database constituting the logical database using the account corresponding to the physical database registered in the above logical database dictionary on the basis of the account information of the application program user which is instructed from the above terminal device.
Furthermore, in the above distributed database management system of the present invention, the above definition information which is defined in the logical database defining unit consists of the identification information of the physical database constituting the logical database and the account information of the physical database.
On the other hand, the present invention provides a distributed database management system which is an information processor which is connected to at least one database (hereinafter called a physical database so as to distinguish from the logical database which will be described later) holding a table via a database management system (hereinafter called a physical database management system so as to distinguish from the distributed database management system of the present invention), is connected furthermore to the application program execution means for accessing the above physical database, receives an access statement for accessing physical databases which is issued by the above application program execution means, and transfers the above access statement to the physical database management system for managing the above physical database by selecting one of the above physical databases as an access object and which has the following configuration.
Namely, the distributed database management system of the present invention has a logical database dictionary for holding information on the logical database wherein at least one of the above physical databases is grouped, a logical database defining unit for registering information on the above logical database in the above logical database dictionary, a statement buffer for holding the above access statement, a logical database access controller for receiving an access statement from the above application program execution means and storing it in the above statement buffer, and a table location searching unit for transferring the above access statement held in the above statement buffer to the physical database management system for managing the above physical database by selecting one of the above physical databases as an access object.
The above table location searching unit has a means for receiving an access statement for instructing logging in the database, when the database which is instructed to be connected is registered in the above logical database dictionary as the above logical database, selecting one of the above physical databases belonging to the instructed logical database as an access object of the above access statement, when a response of access refusal is given to the transfer of the above access statement, selecting another one of the above physical databases belonging to the instructed logical database as an access object of the above access statement, and transferring the above access statement held in the above statement buffer once again.
According to the distributed database management system of the present invention, the logical database access controller receives a database access statement from the application program and informs the table location searching unit of it. The table location searching unit which is informed automatically logs in the database using the identification information and account information of the physical databases constituting the logical database in the logical database dictionary and issues the database access statement received from the application program. The table location searching unit repeats the aforementioned inquiry processing for at least one database constituting the logical database and decides the database which obtains a response indicating processing completion as a table location.
When the physical database account is stored in the logical database dictionary, the table location searching unit of the present invention logs in each physical database using the stored account. When no physical database account is stored, the table location searching unit logs in the physical database using the account received from the above application program execution means.
As mentioned above, according to the distributed database management system of the present invention, the user can access transparently tables stored in a plurality of physical databases constituting the logical database and tables which will be newly stored hereafter without being aware of the table location and physical database account.
In the distributed database management system of the present invention, by logging in each physical database using the account information stored in the logical database dictionary, tables having duplicated names which are prepared by different users can be excluded from the access objects. By doing this, there is no need to define another names for tables having duplicated names which are prepared by different users and to manage them.